﻿using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using OfficeOpenXml.Table;

namespace IotFun.Views.EquipTagView.Dto;

/// <summary>
/// 设备点位输出参数
/// </summary>
[ExcelExporter(Name = "点位管理", TableStyle = TableStyles.Custom, AutoFitAllColumn = true, MaxRowNumberOnASheet = 500)]
[ExcelImporter(IsLabelingError = true)]
public class EquipTagOutput
    {
    [ExporterHeader(IsIgnore = true)]
    [ImporterHeader(IsIgnore = true)]
    public long id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [ExporterHeader(DisplayName = "名称", ColumnIndex = 1)]
    [ImporterHeader(Name = "名称", ColumnIndex = 1)]
    public string name { get; set; }

    /// <summary>
    /// 点位编号
    /// </summary>
    [ExporterHeader(DisplayName = "点位编号", ColumnIndex = 2)]
    [ImporterHeader(Name = "点位编号", ColumnIndex = 2)]
    public string tagnum { get; set; }

    /// <summary>
    /// 编号属性
    /// </summary>
    [ExporterHeader(DisplayName = "编号属性", ColumnIndex = 3)]
    [ImporterHeader(Name = "编号属性", ColumnIndex = 3)]
    public string tagproperty { get; set; }

    /// <summary>
    /// 地址
    /// </summary>
    [ExporterHeader(DisplayName = "地址", ColumnIndex = 4)]
    [ImporterHeader(Name = "地址", ColumnIndex = 4)]
    public string address { get; set; }

    /// <summary>
    /// 数据类型
    /// </summary>
    [ExporterHeader(DisplayName = "数据类型", ColumnIndex = 5)]
    [ImporterHeader(Name = "数据类型", ColumnIndex = 5)]
    public int datatype { get; set; }
    /// <summary>
    /// 数据类型名称
    /// </summary>
    [ExporterHeader(DisplayName = "数据类型名称", ColumnIndex = 6)]
    [ImporterHeader(Name = "数据类型名称", ColumnIndex = 6)]
    public string datatypename { get; set; }

    /// <summary>
    /// 数据长度
    /// </summary>
    [ExporterHeader(DisplayName = "数据长度", ColumnIndex = 7)]
    [ImporterHeader(Name = "数据长度", ColumnIndex = 7)]
    public int datalength { get; set; }

    /// <summary>
    /// 设备Id
    /// </summary>
    [ExporterHeader(DisplayName = "设备Id", ColumnIndex = 8)]
    [ImporterHeader(Name = "设备Id", ColumnIndex = 8)]
    public long equipinfoid { get; set; }
    /// <summary>
    /// 设备名称
    /// </summary>
    [ExporterHeader(DisplayName = "设备名称", ColumnIndex = 9)]
    [ImporterHeader(Name = "设备名称", ColumnIndex = 9)]
    public string? equipname { get; set; }

    /// <summary>
    /// 读写
    /// </summary>
    [ExporterHeader(DisplayName = "读写", ColumnIndex = 10)]
    [ImporterHeader(Name = "读写", ColumnIndex = 10)]
    public int readwrite { get; set; }

    /// <summary>
    /// 读取块
    /// </summary>
    [ExporterHeader(DisplayName = "读取块", ColumnIndex = 11)]
    [ImporterHeader(Name = "读取块", ColumnIndex = 11)]
    public string readblock { get; set; }

    /// <summary>
    /// 是否启用
    /// </summary>
    [ExporterHeader(DisplayName = "是否启用", ColumnIndex = 12)]
    [ImporterHeader(Name = "是否启用", ColumnIndex = 12)]
    public int isenable { get; set; }

    /// <summary>
    /// 表达式
    /// </summary>
    [ExporterHeader(DisplayName = "表达式", ColumnIndex = 13)]
    [ImporterHeader(Name = "表达式", ColumnIndex = 13)]
    public string? expression { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [ExporterHeader(DisplayName = "备注", ColumnIndex = 14)]
    [ImporterHeader(Name = "备注", ColumnIndex = 14)]
    public string? remark { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    [ExporterHeader(DisplayName = "创建时间", ColumnIndex = 15)]
    [ImporterHeader(IsIgnore = true)]
    public DateTime? createtime { get; set; }

}
 

